<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编码管理</title>
<#include "/WEB-INF/content/module-edit.html">
<script type="text/javascript">
$(function(){
  	$("#platform").combobox({
  		valueField : 'id',
  		textField : 'text',
  		editable:false,
  		data:[{"id":"0","text":"android"},
  			  {"id":"1","text":"ios"}]
  	}); 
  	$("#ismustupgrade").combobox({
  		valueField : 'id',
  		textField : 'text',
  		editable:false,
  		data:[{"id":"0","text":"不需要升级"},
			  {"id":"1","text":"非强制升级"},
			  {"id":"2","text":"强制升级"}]
  	});
});
</script>
</head>
<body class="easyui-layout">
	<div region="north" style="background-color: #eee; padding: 5px; overflow: hidden;" border="false">
	<#if object.vid?exists&&object.vid!="">
		<@auth code="base:version:update">
		<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-add" style="border: 1px solid #ccc;" onclick="javascript:save();">保存</a>
		</@auth>
	<#else>
		<@auth code="base:version:create">
		<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-add" style="border: 1px solid #ccc;" onclick="javascript:save();">保存</a>
		</@auth>
	</#if>
	<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-edit" style="border: 1px solid #ccc;" onclick="javascript:cancel();">关闭</a>
	</div>
	<div region="center">
		<div id="p" class="easyui-panel" style="background: #fafafa; padding: 10px" fit="true" toolbar="#toolbar">
			<form id="form" method="post">
				<input type="hidden" id="_id" name="vid" value="${object.vid!}"/>
				<table class="form" cellspacing="0" style="width: 100%">
					<tbody style="border: 1px solid #ccc;">
						<tr>
							<td style="display:none;">
							<td class="label">版本号：</td>
							<td><input name="versionnumber" value="${object.versionnumber!}" class="easyui-validatebox" required="true"/></td>
							<td class="validate">*</td>
							<td class="label">平台：</td>
							<td><input id="platform" name="platform" value="${object.platform!}" value="0"/></td>
							<td class="validate"></td>
						</tr>
						<tr>
							<td class="label">是否强制升级：</td>
							<td><input id="ismustupgrade" name="ismustupgrade" value="${object.ismustupgrade!}"/></td>
							<td class="validate"></td>
							<td class="label">允许的最低版本：</td>
							<td><input name="lowestversion" value="${object.lowestversion!}" class="easyui-validatebox" required="true"/></td>
							<td class="validate">*</td>
						</tr>
						<tr>
							<td class="label">链接地址：</td>
							<td colspan="4"><input id="url" name="url" value="${object.url!}" style="width:90%;" class="easyui-validatebox" required="true"/></td>
							<td class="validate">*</td>
						</tr>
						<tr>
							<td class="label">版本介绍：</td>
							<td rowspan="2" colspan="4"><textarea name="intro" style="width:90%;height:150px;">${object.intro!}</textarea></td>
							<td class="validate"></td>
						</tr>													
					</tbody>
				</table>
			</form>
		</div>
	</div>
</body>
</html>